package com.ruoyi.client.service.impl;

import com.ruoyi.client.mapper.CategoryMapper;
import com.ruoyi.client.mapper.GoodsMapper;
import com.ruoyi.client.pojo.form.GoodsQueryPageForm;
import com.ruoyi.client.pojo.vo.CategoryVo;
import com.ruoyi.client.pojo.vo.GoodsDetailVo;
import com.ruoyi.client.pojo.vo.GoodsVo;
import com.ruoyi.client.service.ICategoryService;
import com.ruoyi.client.service.IGoodsService;
import com.ruoyi.myshop.domain.Goods;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author：HuaQP
 * @Date：2024/9/18
 */
@Service("ClientGoodsServiceImpl")
public class GoodsServiceImpl implements IGoodsService {

    @Resource(name="ClientGoodsMapper")
    private GoodsMapper goodsMapper;

    @Override
    public List<GoodsVo> selectGoodsVoList(GoodsQueryPageForm form) {
        return goodsMapper.selectGoodsVoList(form);
    }

    @Override
    public GoodsDetailVo selectVoById(Integer id) {
        return goodsMapper.selectVoById(id);
    }

    //查询商品对象 ById
    @Override
    public Goods selectByPrimaryKey(Long id) {
        return goodsMapper.selectByPrimaryKey(id);
    }
}
